package com.demo.heima;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lkz
 * @enum EnumTest
 * @description
 * @date 2024/6/5 17:01
 **/
@Getter
@AllArgsConstructor
public enum EnumTest {

    one("1","01"),
    Two("2","02");

    private String name;

    private String code;

    public static List<String> codeList(){
        List<String> stData=new ArrayList<>();
        EnumTest[] values = values();
        for(EnumTest va:values){
            stData.add(va.getName());
        }
        return stData;
    }


}

class DemoTestEnum{
    public static void main(String[] args) {
        System.out.println(EnumTest.codeList());
    }
}